package com.liveneo.adapter.base.filter;

import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import com.liveneo.adapter.base.support.ThreadStore;

/**
 * cxf接口监听(调用结束)
 * 
 * @author fucy
 *
 */
public class ClaimCxfOutInterceptor extends AbstractPhaseInterceptor<Message> {
    public ClaimCxfOutInterceptor(String phase) {
        super(phase);
    }

    public ClaimCxfOutInterceptor() {
        super(Phase.PRE_STREAM);
    }

    @Override
    public void handleMessage(Message message) throws Fault {
        // 清空当前线程中存储的变量
        ThreadStore.clear();
    }
}
